"""
@author: xxw
@file: conn_mysql.py
@time: 2023/7/31 20:12
"""
import pymysql
from config.settings import DB_HOST, DB_SCHEM, DB_PASSWD, DB_PORT, DB_USER
# 打开数据库连接
def conn_mysql():
    conn = pymysql.connect(
        host = DB_HOST,
        port = DB_PORT,
        user = DB_USER,
        passwd = DB_PASSWD,
        db = DB_SCHEM
    )
    return conn